package errorx

const defaultSuccessCode = 200

type CodeSuccess struct {
	Code  int         `json:"code"`
	Msg   string      `json:"msg"`
	Datas interface{} `json:"datas"`
}

type CodeSuccessResponse struct {
	Code  int         `json:"code"`
	Msg   string      `json:"msg"`
	Datas interface{} `json:"datas"`
}

func NewCodeSuccess(datas interface{}, msg string) *CodeSuccess {
	return &CodeSuccess{Code: defaultSuccessCode, Msg: msg, Datas: datas}
}
